package de.gympu.gympulan.data.userdata;

import java.util.Date;

import de.gympu.gympulan.core.GymPuLan;
import de.gympu.gympulan.core.plugins.gpldatabaseplugin.GPLQuery;

public abstract class GPLUser {
	protected String loginName;
	protected String displayName;
	protected String initialPassword;
	
	protected int userID;
	
	protected long lastLogin;
	
	protected GPLUser(int userID, GPLQuery q) {
		this.loginName = q.getString("loginName");
		this.displayName = q.getString("displayName");
		this.initialPassword = q.getString("initialPassword");
		
		this.userID = userID;
		this.lastLogin = q.getLong("lastLogin");
	}

	public String getLoginName() {
		return loginName;
	}

	public String getDisplayName() {
		return displayName;
	}

	public String getInitialPassword() {
		return initialPassword;
	}

	public int getUserID() {
		return userID;
	}

	public long getLastLogin() {
		return lastLogin;
	}
	
	public abstract void updateLastLogin();

}
